﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Base.Schema;
using Base.DataModel;

namespace Base
{
    [SchemaElementName("schema")]
    public class NiftySchema : IdentifiedItem
    {
        public NiftySchema(string name, Guid64 id)
            : base(name, id)
        {
            _entities = new IdItemCollection<Entity>(this);
        }

        public NiftySchema(string name)
            : this(name, null)
        { }

        // Containers
        private IdItemCollection<Entity> _entities;

        [SchemaCollection("entities")]
        public IdItemCollection<Entity> Entities
        {
            get
            {
                return _entities;
            }
        }
    }
}
